{"version":3,"sources":["script.js"],"names":["BX","CrmEntitySelector","parameters","this","randomString","jsObject","fieldUid","fieldName","usePrefix","listPrefix","selectorEntityTypes","multiple","listElement","listEntityType","pluralCreation","Boolean","listEntityCreateUrl","currentEntityType","context","initialize","prototype","popupObject","popupId","popupBindElement","popupContent","externalRequestData","externalEventHandler","addCustomEvent","proxy","setSelectedElement","unsetSelectedElement","createNewEntity","event","window","currentTarget","createPopup","performExternalRequest","entityType","popupWindow","close","setCurrentEntityType","url","util","add_url_param","getCreateUrl","external_context","SidePanel","Instance","open","delegate","onExternalEvent","params","key","type","isNotEmptyString","value","isPlainObject","typeName","toUpperCase","isCanceled","isBoolean","selector","UI","SelectorManager","instances","valueEntityType","entityInfo","isNotEmptyObject","selectedItems","code","itemsSelected","hasOwnProperty","id","onCustomEvent","selectorId","slider","getSlider","destroy","popupItems","k","length","push","text","message","onclick","PopupMenu","getMenuById","buttonRect","getBoundingClientRect","create","closeByEsc","angle","offsetLeft","width","show","itemInfo","selected","initWidgetEntitySelection","loadCSS","loadScript","CRM","Set","lead","contact","company","deal","quote","order","ok","cancel","wait","noresult","add","edit","search","last"],"mappings":"AAAAA,GAAGC,kBAAoB,WAEtB,IAAIA,EAAoB,SAAUC,GAEjCC,KAAKC,aAAeF,EAAWE,aAC/BD,KAAKE,SAAWH,EAAWG,SAC3BF,KAAKG,SAAWJ,EAAWI,SAC3BH,KAAKI,UAAYL,EAAWK,UAC5BJ,KAAKK,UAAYN,EAAWM,UAC5BL,KAAKM,WAAaP,EAAWO,WAC7BN,KAAKO,oBAAsBR,EAAWQ,oBACtCP,KAAKQ,SAAWT,EAAWS,SAC3BR,KAAKS,YAAcV,EAAWU,YAC9BT,KAAKU,eAAiBX,EAAWW,eACjCV,KAAKW,eAAiBC,QAAQb,EAAWY,gBACzCX,KAAKa,oBAAsBd,EAAWc,oBACtCb,KAAKc,kBAAoBf,EAAWe,kBACpCd,KAAKe,QAAUhB,EAAWgB,QAE1Bf,KAAKgB,cAGNl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